Repository navigation
feat(spec,plugin-report): report chart showEmptyGroups — show the declared options that have no records - #38284
objectstack-fleet[bot] wants to merge 15 commits into
Conversation
… no records Claude-Session: https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3 Co-Authored-By: Claude <noreply@anthropic.com>
…ness counts for showEmptyGroups Claude-Session: https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3 Co-Authored-By: Claude <noreply@anthropic.com>
…er chart.showEmptyGroups Claude-Session: https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3 Co-Authored-By: Claude <noreply@anthropic.com>
… the date-axis no-op Claude-Session: https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3 Co-Authored-By: Claude <noreply@anthropic.com>
… records Claude-Session: https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3 Co-Authored-By: Claude <noreply@anthropic.com>
…in-report README Claude-Session: https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3 Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3 Co-Authored-By: Claude <noreply@anthropic.com>
…nder Claude-Session: https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3 Co-Authored-By: Claude <noreply@anthropic.com>
The chart reads emptyGroupValueFor from @objectstack/spec/data at runtime, so the package moves from devDependencies to dependencies. Claude-Session: https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3 Co-Authored-By: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 177 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 2073dcdd9fb5abca00126345ce6f610c63b567bb && git checkout 2073dcdd9fb5abca00126345ce6f610c63b567bb
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 333e6f3f7324df63aaee756e588acedd90406775 2ac50c0e6f6f86da8574c22e00fa13fd1ff82648 && git checkout -B drift-repro 333e6f3f7324df63aaee756e588acedd90406775 && git merge --no-ff 2ac50c0e6f6f86da8574c22e00fa13fd1ff82648
node scripts/docs-audit/affected-docs.mjs --json 333e6f3f7324df63aaee756e588acedd90406775 |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract-review-claim: session_01L9qibwSEecrzDjKjbk24r1 · head 86c2dbe · 2026-11-28T11:48Z |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract reviewServed-tier: Inputs read: card #36722, its body and all five comments (triage, claim 7237658512, amendment 1 7237862534, os-dev-report 7238447636, amendment 2 7238456293); PR #38284, its body, both comments, the 30-file list (+677, -10) and the net diff from merge base ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
The remaining checks on the first consumer hold. A mark on an added group opens no list (added rows are appended, and the click handler returns for an index at or past S1 (should-fix) — the published contract lists two no-fill conditions and the renderer has a third: a zero-row answer.
S3 (should-fix) — "left out" is decided by matching spellings, where the answer carries the stored value. The fill builds
S2 (should-fix) — the builder removes an authored Generated and baseline rows ( Nits, none of which moves correctness:
No must-fix. S1, S2 and S3 are open on this head, and a delta review of their fix is owed. Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 The brief the contract reviewer above was handed, filled, for the seat to read before it adopts the record: Contract review brief — PR #38284 @
|
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a REWORK at
|
…ue drillRawRows carries A label the server translated at the request locale can differ from the one the client holds, and a spelling miss drew a false zero beside the real group. A row whose raw twin states the x-axis value is now matched by that value alone; only a row with no raw twin falls back to spellings. Claude-Session: https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3 Co-Authored-By: Claude <noreply@anthropic.com>
… series chart type An unrelated edit dropped an authored switch from a stored funnel, pie or any series type the builder does not offer. The switch now follows the renderer's series plan: kept and shown on every type it fills, dropped only on the single-value and tabular types. Claude-Session: https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3 Co-Authored-By: Claude <noreply@anthropic.com>
…carries its liveness row The TSDoc and describe now state that nothing is added when the report's order reaches the chart and that an answer with no rows draws no chart, and that a derived measure stays empty. The reference page is regenerated. The key gets its own liveness row citing the reader and its tests. Claude-Session: https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3 Co-Authored-By: Claude <noreply@anthropic.com>
…DME and changesets Claude-Session: https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3 Co-Authored-By: Claude <noreply@anthropic.com>
…tcher the chart's type allows Claude-Session: https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3 Co-Authored-By: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract-review-claim: session_01L9qibwSEecrzDjKjbk24r1 · head 1c290e5 · 2026-11-28T13:11Z |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract reviewServed-tier: DELTA review from Inputs read: card #36722, its body and all five comments (no new one since amendment 2); PR #38284, its body as it stands, its comments through the claim for this head (7239766892), the 31-file list (+788, -12), the net diff from merge base ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentNo must-fix. One should-fix, owing a delta review.
The sentences carried over from the earlier head still hold as judged there: S4 (should-fix) — on the chart types that size a mark by its value, an added group is not drawn, and the builder now offers the switch on them.
So on six of the 13 types the switch is kept, shown in the builder and described as drawing groups, and on treemap, sankey and scatter nothing is drawn for them; on pie, donut and funnel the only trace is a footnote that reads as a data warning, and on a funnel over an avg, min, max or derived measure the fill can cost the real stages. The TSDoc and This was reachable at the earlier head too, through the schema on any of these types and through the builder's own donut. The earlier record did not read the chart component, and its S2 remedy pointed at the series plan. The delta followed that remedy and so widened the builder's offer from one such type to six. The reading above is from the chart's code and its own measured comments, not from a run, and no browser reading in the PR covers one of these types. The fix is one predicate, shared by the renderer and the builder, for the types where an empty group has somewhere to be drawn:
Keeping the fill on pie, donut and a count or sum funnel is a legitimate choice if the contract says what is and is not drawn there; treemap, sankey and scatter cannot be kept as they stand.
Nits:
S1, S2 and S3 are closed on this head. S4 is open on it. Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a delta: REWORK at Closed at this head. The contract-review delta record above (7239843832) is PASS and confirms it, and my own read agrees:
Open, should-fix S4 (from the record; I spot-checked it in
So the constant's comment, the Asked:
Keeping pie, donut, and a count-or-sum funnel filled is acceptable if the contract says what is drawn there. Treemap, sankey and scatter cannot stay as they are. While the changeset is open for S4: the ui changeset's "never" drawn as a second zero group holds only where the answer carries a raw row. Soften it. Seat bookkeeping: This head is green (64 success, 0 failed, mergeable clean). Another L2 and L1 delta is owed on the S4 head. |
…ts with a category axis A chart that sizes its marks by value (pie, donut, funnel, treemap, sankey) draws a zero group as nothing, and scatter takes no select axis, so one shared predicate, chartDrawsEmptyGroups, now bounds the renderer's fill and the builder's switch to bar, column, horizontal-bar, line, area, radar and combo. The builder still keeps an authored key on every series type, and shows no switch over a date axis. The TSDoc, describe, reference page, reports page, README, ledger note and changesets name the families. Claude-Session: https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3 Co-Authored-By: Claude <noreply@anthropic.com>
repo:objectstack#3 · os-tesla · session_01L9qibyFBwGSJLARjP5asi3
Requested by Tesla · project thread
Fixes #36722
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: none — an optional, off-by-default presentation switch; the skill's report block teaches the chart's data keys (
xAxis,yAxis,seriesBy), and the chart chrome beside it (showLegend,showDataLabels) is not taught there either维护者速读
What changes
packages/spec/src/ui/report.zod.ts:ReportChartSchemagainsshowEmptyGroups: z.boolean().optional(), no default. A report that does not set it parses exactly as before. The TSDoc and the.describe()state every case the switch adds nothing in: a field with no declared options, anorderthat reaches the chart, and an answer with no rows (it still draws no chart). They also say that a derived measure stays empty and that an option the report's own filter excludes reads as empty. Generated: the report reference page, the authorable surface (ui/ReportChart:showEmptyGroups) and the report liveness counts.packages/spec/liveness/report.json: the key's ownliverow underchart.children(review nit N1), citingfillEmptyOptionGroups,DatasetReportChartand their tests, beside theseriesByrow.ui/packages/plugin-report/src/emptyOptionGroups.ts(new):fillEmptyOptionGroups(rows, fill)adds one row for each declared option of thexAxisfield that no answer row carries. An added row carries the stored value, so relabelling, declared order and option colours treat it like a real group. Its measure cells areemptyGroupValueFor(aggregate)from@objectstack/spec/data, the table the analytics executor fills its own empty groups with:0for count and sum, no value for avg/min/max. WithseriesByan added option gets one row per series value in the answer. Added rows are appended, so every index below the answer's length still addresses the answer. Whether an option is missing is judged by the stored value the answer'sdrillRawRowscarries (index-aligned with the rows): a row whose raw twin states the x-axis value is matched by that value alone, so a label the server translated at the request locale never reads as a second, zero-valued group. Only a row with no raw twin falls back to spellings (stored value, authored label, localized label).ui/packages/plugin-report/src/DatasetReportRenderer.tsx: the report chart calls the fill whenchart.showEmptyGroups === trueand noorderreaches the chart's selection, before relabelling and the declared-order arrangement, and hands itstate.drillRawRows. A mark on an added group opens no record list. This is plugin-report's first runtime import of@objectstack/spec, so the package moves it fromdevDependenciestodependencies(check:undeclared-dep-imports). The library build externalizes every bare specifier, so the bundle does not grow, and plugin-dashboard already depends on@objectstack/specand imports@objectstack/spec/dataat runtime. No ui/ import rule refuses it.ui/packages/plugin-report/src/builder/: the report builder shows a "Show groups with no records" switch on every chart type the renderer draws as a series (planReportChart's 13 series types: bar, line and donut among the builder's own choices, and a stored funnel, pie or other series type). It saveschart.showEmptyGroups: true, turning it off removes the key, and an edit keeps it on every series type; only a single-value or tabular type drops it. One new locale key,report.builder.chart.showEmptyGroups, in all 11 packs.content/docs/ui/reports.mdxand a README note in plugin-report, both naming the no-fill cases.@objectstack/specminor;@object-ui/plugin-report,@object-ui/i18npatch.Not changed: the analytics executor and the dataset query (route B of the pre-claim report is not built), the table under the chart, HotCRM.
Why
A grouped dataset query answers one row per value that holds rows, so a select option no record carries is absent from the answer. A "deals by stage" bar chart then has no bar for an empty stage, and the stage reads as not existing rather than as zero. The issue's date half already holds on
main: the executor fills every bucket of a report's period (#26893), so a date axis needs no switch.Tests
emptyOptionGroups.test.ts(new, 10 cases): presence by the raw twin's stored value (a server label the client does not know is still present, with the no-raw-twin control drawing the false zero; a raw value overrules a display spelling another option carries; a row without a raw twin falls back to spellings); presence by value, label and localized label; count and sum at 0, avg with no value; one row per series value, the null series included; duplicate declarations added once; the input array returned when nothing is missing.DatasetReportRenderer.test.tsx, a new top-leveldescribein the shared harness (9 cases): count fill in declared order at 0; a group the server labelled "Gewonnen" whose raw twin isclosed_wonis recognised, so no "Closed Won" at 0 is added; sum at 0 and avg empty;seriesByat 0 in every series; a mark on an added stage opens no list and a real one still drills; the selection sent is identical with the switch on and off; CONTROLS that add nothing: switch off, a measureorder, a text field with no declared options.DatasetReportRenderer.dateRange-25873.test.tsx, a newdescribe: a date axis over a period sends the same selection and draws the same buckets, the empty month included, with the switch on and off.reportBuilder-36374.test.tsx, a newdescribe: the switch saves, parses as a valid report, reopens checked, and off removes the key; it is on for bar, line and donut and hidden on a number; the model keeps it across edits and drops it on metric and table; a stored funnel keeps it across a measure and a grouping edit and shows it, a stored gauge drops it; and over the wholeChartTypeSchemavocabulary the builder offers it on exactly the typesplanReportChartplans as a series.packages/spec/src/ui/report.test.ts: absent stays absent, and a non-boolean is refused atshowEmptyGroups.Acceptance notes
limitoroffset, and the dataset answer carries no truncation signal, so a truncated chart answer does not occur on this path; there is nothing to test. (2) The fill declines under ANYorderthat reaches the chart, a dimension order included, not only a measure order. Appended rows have no place in an authored order, and the declared-option arrangement is already off under an order. This narrows when the switch acts; it refuses nothing..describe(), the reports page and the README now say so.Verification
pnpm --dir ui exec vitest run packages/plugin-report/src/__tests__/emptyOptionGroups.test.ts packages/plugin-report/src/__tests__/DatasetReportRenderer.test.tsxpasses, the new blocks included.fillEmptyOptionGroups(emptyOptionGroups.ts), then thechartRowsline inDatasetReportChart(DatasetReportRenderer.tsx).Local readings at 1c290e5
0at its declared place; sum reads0; avg has no value at the added stage (nothing to average).orderadds nothing; a text field with no declared options adds nothing. The selection sent to the dataset is identical with the switch on and off.scripts/ablation-replace.mjs, each restore blob == HEAD: the fill condition forced false (at 6508986), 4 failed / 111 passed across the four touched suites, the four failures being the fill cases (count, sum/avg, seriesBy, drill), with the controls and the date pin green; the raw-twin branch disabled (at 0d03b6f), 3 failed / 104 passed, the three stored-value pins; the builder's switch set put back to bar/line/donut, 2 failed / 105 passed, the stored-funnel pin and theplanReportChartparity pin.emptyOptionGroups,DatasetReportRenderer,reportBuilder-36374107 passed,DatasetReportRenderer.dateRange-25873andreport-spec-paritygreen (5 files, 134 passed at 0d03b6f); at 86c2dbe the four touched files 115 passed andpnpm --dir ui exec vitest run packages/plugin-report packages/i18n149 files, 2292 passed, 20 skipped.packages/specsrc/ui/report.test.ts83 passed.@object-ui/plugin-reporttype-checkexit 0 at 1c290e5, after building its dependencies' declarations. CI's Type Check UI was red at a9c6b54 on one new test line (TS2339,chart?.typeread off{}), reproduced locally and fixed in 1c290e5.objectstack dev --freshplus the console on vite, Playwright): on the local fresh database the two Backlog tasks were moved to To Do, so thestatusoption Backlog holds no records. "Hours by Status (Chart)" drew To Do, In Progress, In Review, Done. In the report builder the "Show groups with no records" switch sits under "Show values". Switched on, the preview drew Backlog, To Do, In Progress, In Review, Done, with Backlog first (declared order) at no height. The switch is hidden on Number, and coming back to Bar it is off (the metric drops the key). Save sentPUT /api/v1/meta/report/showcase_hours_by_status_chartwithchart.showEmptyGroups: true, then publish. The reloaded report view drew the five statuses, and the builder reopened with the switch on.dispatch-gates --ranwith recorded exit codes, swept at a9c6b54/1c290e5b: 126 derived, 125 run exit 0, 1 NOT MEASURED (exit 3:check-plugin-teardown-shape --self-test, fixture commit outside the shallow clone), 0 unrun.check:dts-closureandcheck:dual-build-cjs-loadsfirst exited 1 on an incomplete local dist (no declarations forservice-cluster, missingplatform-objectsfiles), packages this diff does not touch; both exit 0 after rebuilding those packages. The first sweep at 6508986 found one real red,check:undeclared-dep-imports(@objectstack/specwas a dev dependency), fixed in 86c2dbe.overlap-check.mjsVERDICT clean exit 0 at 1c290e5 against main and feat(service-knowledge): each source's sync state is one durable record, the same on every node #38307, fix(data-objectstack): uploadFile/uploadFiles upload through the storage service presigned flow #38237, feat(console): a new chat conversation is about the record on the page until its first send, shown as a chip in the composer #38230, chore: version packages (next) #38192, feat(spec)!: retire FormView modalSize — no form view opens in a dialog #38168 (all merge cleanly).Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3